package top.chj.day16.zhengze;

import org.junit.Test;

/**
 * @Auther:小陈的Java
 */
public class RegexDemo3 {
    @Test
    public void test1() {
        System.out.println("a09".matches("\\w?"));
    }
    @Test
    public void test2() {
        System.out.println("abcd".matches("[a-z]*"));
    }
    @Test
    public void test3() {
        System.out.println("a09".matches("\\w+"));
    }
    @Test
    public void test4() {
        System.out.println("13838943838".matches("1{1}[0-9]{10}"));
    }
    @Test
    public void test5() {
        System.out.println("abcd".matches("[a-z]{2,}"));
    }
    @Test
    public void test6() {
        System.out.println("abcdefg".matches("[a-z]{2,3}"));
    }
}
